package com.cskaoyan.javase.object.wrapper;

import javax.sound.midi.Soundbank;

/**
 * 每个数值类型的包装类型中
 * 都会存放该类型的最大值和最小值
 * 其中整型包装类型会直接存储值
 *
 * @since 10:18
 * @author wuguidong@cskaoyan.onaliyun.com
 */
public class Demo2 {
    public static void main(String[] args) {
        System.out.println(Integer.MAX_VALUE);
        // Numeric overflow in expression
        System.out.println(Integer.MAX_VALUE + 1);

        System.out.println(Byte.MAX_VALUE);
        // 结果是int不会溢出
        System.out.println(Byte.MAX_VALUE + 1);
        System.out.println(((byte) (Byte.MAX_VALUE + 1)));

        System.out.println(Short.MAX_VALUE);
        System.out.println(Short.MAX_VALUE + 1);

        System.out.println(Character.MAX_VALUE + 0);
        System.out.println(Character.MAX_VALUE + 1);

        System.out.println(Long.MAX_VALUE);
        // Numeric overflow in expression
        System.out.println(Long.MAX_VALUE + 1);
    }
}
